package cloud.dandanit.itservice.controller.hyperlink;


import cloud.dandanit.itservice.entity.Hyperlink;
import cloud.dandanit.itservice.service.HyperlinkService;
import cloud.dandanit.itservice.utils.R;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 课程简介 前端控制器
 * </p>
 *
 * @author luokai
 * @since 2022-07-05
 */
@SuppressWarnings("DuplicatedCode")
@RestController
@RequestMapping("/itservice/hyperlinkfront")
public class HyperlinkFrontController {

    @Autowired
    private HyperlinkService hyperlinkService;

    /**
     * 获取前台首页文章方法
     * @return 图片列表
     */
    @GetMapping("getIndexHyperlink")
    @ApiOperation("获取首页文章接口")
    public R getIndexHyperlink() {

        List<Hyperlink> hyperlinkList = hyperlinkService.getIndexList();
        return R.ok().data("hyperlinkList", hyperlinkList);
    }
}

